package net.dontdrinkandroot.example.angularrestspringsecurity.entity;

import java.io.Serializable;
import java.util.Date;


import net.dontdrinkandroot.example.angularrestspringsecurity.JsonViews;

import org.codehaus.jackson.map.annotate.JsonView;


public class NewsEntry implements Serializable {

	private Long id;
	private Date date;
	private String content;


	public NewsEntry() {

		this.date = new Date();
	}


	@JsonView(JsonViews.Admin.class)
	public Long getId() {

		return this.id;
	}


	@JsonView(JsonViews.User.class)
	public Date getDate() {

		return this.date;
	}


	public void setDate(Date date) {

		this.date = date;
	}


	@JsonView(JsonViews.User.class)
	public String getContent() {

		return this.content;
	}


	public void setContent(String content) {

		this.content = content;
	}


	@Override
	public String toString() {

		return String.format("NewsEntry[%d, %s]", this.id, this.content);
	}

}
